package com.hz.house.enums;
/**
 * <p> 户型的查询条件
 * @author lfw
 */
public enum SearchHouseModelConditionEnum {
	
	ONE_HOUSE(1,"one","一室"),
	TWO_HOUSE(2,"two","两室"),
	THREE_HOUSE(3,"three","三室"),
	FOUR_HOUSE(4,"fourMore","四室"),
	FIVE_HOUSE(5,"fiveMore","五室"),
	SIX_HOUSE(6,"sixMore","五室以上");
	
	private int id;
	
	private String type;
	
	private String name;
	
	
	
	SearchHouseModelConditionEnum(int id,String type,String name){
		this.id=id;
		this.type=type;
		this.name=name;
	}

	/**
	 * <p> 根据id获取条件
	 * @param id
	 * @return
	 */
	public static SearchHouseModelConditionEnum getHouseModelById(int id) {
		SearchHouseModelConditionEnum[] all = SearchHouseModelConditionEnum.values();
		for(SearchHouseModelConditionEnum s:all) {
			if(s.getId()==id)
				return s;
		}
		return null;
	}
	
	

	public int getId() {
		return id;
	}



	public String getType() {
		return type;
	}



	public String getName() {
		return name;
	}
	
	
	
}
